package fei.zhou.lambdalearn.demo3;

/**
 * 描述该类- JPA
 *
 * @author zhoufei
 * @class: Toshow
 * @date 2020/12/22 20:49
 * @Verson 1.0 -2020/12/22 20:49
 * @see
 */
public class Demo4 {
    public static void main(String[] args) {
        method((String s, int x, int y) -> s.substring(x, y));
        System.out.println("-----引用类的实例方法----");
        method(String::substring);
    }
    
    public static void method(Toshow toshow) {
        String Str = toshow.toSee("HelloWorld", 2, 5);
        System.out.println("Str：" + Str);
    }
    
    interface Toshow {
        String toSee(String s, int x, int y);
    }
    
}